#ifndef NANE_ISERIALIZESYSTEM_H
#    define NANE_ISERIALIZESYSTEM_H

#   include "nane/core/types.h"
#   include "nane/core/ISubSystem.h"
#   include "nane/core/IFileSystem.h"

namespace nane
{
    struct IInput;
    struct IOutput;
    
    struct ISerializationProtocol
    {
        virtual bool Serialize( const char* _tag ) = 0;
        virtual bool Serialize( const char* _tag, int32 _data ) = 0;
        virtual bool Serialize( const char* _tag, uint32 _data ) = 0;
        virtual bool Serialize( const char* _tag, float _data ) = 0;
        virtual bool Serialize( const char* _tag, bool _data ) = 0;
        virtual bool Serialize( const char* _tag, const char* _data ) = 0;
    };

    struct ISerializeSystem
        : public ISubSystem
    {
        virtual bool Deserialize( IInput* _input, ISerializationProtocol* _protocol, byte* _buffer, uint32 _bufferSize ) = 0;
        virtual ISerializationProtocol* CreateProtocol( IOutputRef* _outputRef ) = 0;
        virtual void ReleaseProtocol( ISerializationProtocol* _protocol ) = 0;
    };

}   // namespace nane

#endif  // NANE_ISERIALIZESYSTEM_H
